﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ServiceModel.DomainServices.Client;

namespace Agility.ViewModels
{
    public class RegistrationCompletedEventArgs : EventArgs
    {
        public RegistrationCompletedEventArgs(bool loggedIn, bool hasValidationErrors, string errorMessage, Exception error)
        {
            this.LoggedIn = loggedIn;
            this.HasValidationErrors = hasValidationErrors;
            this.Error = error;
            this.ErrorMessage = errorMessage;
        }

        /// <summary>
        /// Gets the login success.
        /// </summary>
        public bool LoggedIn { get; private set; }

        /// <summary>
        /// Gets the error that caused the registration to fail.
        /// </summary>
        public Exception Error { get; private set; }

        /// <summary>
        /// Gets whether the user registration has validation errors.
        /// </summary>
        public bool HasValidationErrors { get; private set; }

        /// <summary>
        /// Gets the error message associated with unsuccessful registration.
        /// </summary>
        public string ErrorMessage { get; private set; }
    }
}
